﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace TinyEngineEditor.Controls
{
    /// <summary>
    /// Interaction logic for ExceptionViewer.xaml
    /// </summary>
    public partial class ExceptionViewer : Window
    {
        Exception exception;
        public ExceptionViewer(Exception exc)
        {
            exception = exc;
            InitializeComponent();

            txtMessage.Text = exc.Message;
            txtDetails.Text = exc.ToString();
        }
        public static void ShowException(Exception ex)
        {
            ExceptionViewer v=new ExceptionViewer(ex);
            v.ShowDialog();
        }
    }
}
